package com.ruoyi.event.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.ExcelDictFormat;
import com.ruoyi.common.annotation.UserDrugInfo;
import com.ruoyi.common.convert.ExcelDictConvert;
import lombok.Data;

import java.util.Date;


/**
 * 管控措施视图对象 event_gkcs
 *
 * @author strongme
 * @date 2023-02-04
 */
@Data
@ExcelIgnoreUnannotated
public class EventGkcsVo implements EventInfo {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ExcelProperty(value = "id")
    private Long gkcsId;

    /**
     * 吸毒人员id
     */
    @ExcelProperty(value = "吸毒人员id")
    private Long userId;

    @UserDrugInfo
    public Object getUserInfo() {
        return userId;
    }

    /**
     * 时间
     */
    @ExcelProperty(value = "时间")
    private Date sj;

    /**
     * 类型区分
     */
    @ExcelProperty(value = "类型区分", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "gkcslxqf")
    private String lxqf;

    /**
     * 上传附件
     */
    @ExcelProperty(value = "上传附件")
    private String fj;

    /**
     * 措施内容
     */
    @ExcelProperty(value = "措施内容")
    private String csnr;


    @Override
    public Long getId() {
        return gkcsId;
    }

    @Override
    public String getText() {
        return csnr;
    }

    @Override
    @JsonFormat(pattern = "yyyy-MM-dd")
    public Date getTime() {
        return sj;
    }
}
